import {createWebHistory,createRouter} from "vue-router";

const routes=[
    {
        path:'',
        component:()=>import('../pages/HelloBody')
    },
    {
        path:'/login',
        component:()=>import('../pages/login/index')
    },
    {
        path:'/index',
        component:()=>import('../pages/index'),
        children:[
            {
                path:'',
                component : () => import('../pages/article/articlelist')
            },
            {
                name:"index",
                path:':kind',
                component : () => import('../pages/article/articlelist')
            },
            {
                name:'content',
                path:'content/:id',
                component: () =>import('../pages/article/article')
            },
            {
                path:'edit',
                component: () => import('../pages/article/edit')
            },
            {
                path:'user',
                component: () => import('../pages/userData')
            },
            {
                path:'/control',
                component: () => import('../pages/control')
            }
        ]
    }
]
export default createRouter({
    routes,
    history:new createWebHistory(),
    // model:
})
